#include <stdio.h>
#include <string.h>
#define N 100
#define MAX 15
int FindFirst(char str[][MAX],int n)
{
    int i,first;
    first=0;
    for(i=1;i<n;i++)
    {
        if(strcmp(str[i],str[first])<0)
        {
            first=i;
        }
    }
    return first;
}
void main()
{
    int i,n;
    char name[N][MAX];
    printf("please input how many countries:");
    scanf("%d",&n);
    getchar();
    for(i=0;i<n;i++)
    {
        printf("please input the No.%d country:\n",i+1);
        gets(name[i]);
    }
    printf("According to the alphabet order,the first country is %s",name[FindFirst(name,n)]);
}
